﻿<?php
include("../Modules/admin_resist_mdl.php");
// include('doctype.htm');
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>
<script language="javascript">

	function emptyCheck()
	{
		if ( (document.frmChgPass.txtMK1.value == "") ||
			 (document.frmChgPass.txtMK2.value == "")	)
		
			document.frmChgPass.subOK.disabled = true;
		
		else
			document.frmChgPass.subOK.disabled = false;
	}
	
	function passCheck()
	{
		if (document.frmChgPass.txtMK1.value != document.frmChgPass.txtMK2.value)
		{
			alert("Mật khẩu không khớp");
			return false;
		}
		else return true;
	}
	
</script>

<?php
	$acctype = $_GET["acctype"];
	
	$mssv = @$_GET["mssv"];
	$makhoa = @$_GET["makhoa"];
	$mscb = @$_GET["mscb"];
	$msbm = @$_GET["msbm"];
?>

<h4>Đổi mật khẩu mới</h4>

<form
	method = "post"
	action = "../Modules/admin_doimk.php?acctype=<?php echo $acctype; ?>&<?php switch ($acctype) { case "sv": echo "mssv=".$mssv; break; case "sv": case "cnk": echo "makhoa=".$makhoa; break; case "gv": echo "mscb=".$mscb; break; case "cnbm": echo "msbm=".$msbm; break; } ?>"
	name = "frmChgPass"
	onsubmit = "passCheck();"
>
	<ul>
		<li>
			<span>Mật khẩu</span>
			<input type="password" name="txtMK1" onkeyup="emptyCheck();">
		</li>
		<li>
			<span>Nhập lại mật khẩu</span>
			<input type="password" name="txtMK2" onkeyup="emptyCheck();">
		</li>
	
		<li><input type="submit" class="submit" name="subOK" value="OK" disabled="true"></li>
	</ul>
</form>
</body>

</html>
